//
//  ZWHomeButtonModel.m
//  aixianfeng
//
//  Created by zhaowei on 17/5/4.
//  Copyright © 2017年 zhaowei. All rights reserved.
//

#import "ZWHomeButtonModel.h"
#import "ZWHomeManager.h"

@implementation ZWHomeButtonModel


- (instancetype)init {
    
    
    self = [super init];
    if (self) {
        
        [self setup];
        
    }
    return self;
    
}


- (void)setup {
    
    NSDictionary *buttonDict = [_HomeManager requestHomeInfomation];
    NSArray *buttonArr = buttonDict[@"data"][@"act_info"][1][@"act_rows"];
    
    NSMutableArray *nameMutable = [NSMutableArray array];
    NSMutableArray *imgMutable = [NSMutableArray array];
    for (int i=0; i<4;i++) {
        [nameMutable addObject:buttonArr[i][@"activity"][@"name"]];
        [imgMutable addObject:buttonArr[i][@"activity"][@"img"]];
    }
    
    self.nameArr = nameMutable.copy;
    self.imageUrlArr = imgMutable.copy;
    
}


@end
